package creator.builder.family;


import creator.builder.ArmysBuilder;
import creator.factory.FigureAbstractFactory;
import creator.factory.SanGuoFigureFactory;
import creator.factory.resources.Resources;
import creator.factory.soldier.Solider;
import creator.factory.wujiang.Wujiang;

import java.util.LinkedList;
import java.util.List;

/**
 * 魏国武将构建
 */
public class WuGuoArmysBuilder extends ArmysBuilder {

    @Override
    public void buildWujiang() {
        System.out.println("创建吴国武将了！！");
        List<Wujiang> wujiangList = new LinkedList<>();
        FigureAbstractFactory factory = new SanGuoFigureFactory();
        Wujiang lidian = factory.createWujiang("1");
        Wujiang zhangliao = factory.createWujiang("1");
        Wujiang xiahoudun = factory.createWujiang("1");
        wujiangList.add(lidian);
        wujiangList.add(zhangliao);
        wujiangList.add(xiahoudun);
        armys.setWujiangList(wujiangList);
    }

    @Override
    public void buildSolider() {
        System.out.println("创建吴国士兵了！！");
        List<Solider> soliderList = new LinkedList<>();
        FigureAbstractFactory factory = new SanGuoFigureFactory();
        Solider qibing = factory.createSolider("1");
        Solider bubing = factory.createSolider("1");
        soliderList.add(qibing);
        soliderList.add(bubing);
        armys.setSoliderlist(soliderList);
    }

    @Override
    public void buildResources() {
        System.out.println("创建资源了！！");
        List<Resources> resourcesList = new LinkedList<>();
        FigureAbstractFactory factory = new SanGuoFigureFactory();
        Resources resources = factory.createResources("1");
        resourcesList.add(resources);
        armys.setResourcesList(resourcesList);

    }
}
